package com.merry.spring5.validation;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author ybzou
 * spring实现数据校验的第二种方式的实体类
 */
public class Phone2 {

    @NotNull
    private String name;

    @Min(0)
    @Max(value = 200,message = "age 超过了。。。")
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
